package com.yueshixinxi.testwindows;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import android.os.Bundle;
import android.view.View;

import com.yueshixinxi.testwindows.databinding.ActivityMain2Binding;
import com.yueshixinxi.testwindows.databinding.ActivityMainBinding;
import com.yueshixinxi.testwindows.model.Swordsman;

public class MainActivity2 extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
       
        //1.文字
        ActivityMain2Binding binding= DataBindingUtil.setContentView(this,R.layout.activity_main_2);
        Swordsman swordsman=new Swordsman("张无忌","s");
        binding.setSwordsman(swordsman);
        //2.事件处理
        binding.btNext.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                
            }
        });
        //3.布局属性
    }

}